import request from '@/utils/request';
import downloader from '@/utils/downloader';
//获取待审核列表接口
export function roomList(data) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/appointment/device/list',
    method: 'get',
    params: data,
  });
}

//审核房间接口
export function roomAudit(data) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/appointment/device/audit',
    method: 'post',
    data,
  });
}
// 用户预约记录查询

export function creditfs(data) {
  return request({
    url: '/admin/credit/list',
    method: 'get',
   params: data,
  });
}

//获取信用分列表
export function creditList(data:any) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/credit/getConf',
    method: 'get',
    params: data,
  });
}
//评价信用分
export function saveEvaluate(data) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/appointment/device/saveEvaluate',
    method: 'post',
    data,
  });
}
// 获取预约详情


export function bookingInfo(data:any) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/appointment/device/info',
    method: 'get',
    params: data,
  });
}
//导出
export function importDc(data) {
  return downloader({
    // /admin/user/adminUser/adminUserExport
    url: '/admin/appointment/device/export',
    method: 'POST',
    data: data,
  });
}
// 删除设备记录 


export function delbooking(data:any) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/appointment/device/delete',
    method: 'DELETE',
    params: data,
  });
}// 上传图片
export function uploadFile(data) {
  return request({
    url: '/user/uploadFile',
    method: 'POST',
    data,
  });
} 